1. Field of the Invention
The present invention relates to an image processing method and an image processing apparatus. Particularly, the present invention relates to a shading method effective in duplicating cultural properties, works of art, paintings, and the like by combining a digital camera and a printer and an image processing apparatus using the method.
2. Description of the Related Art
Cultural heritages such as sliding screens, folding screens, and paintings are inevitably deteriorating year by year due to the influences of temperature, humidity, sunlight, and the like. In order to pass valuable cultural heritages down the generations, aging cultural heritages have been restored, and attempts have been vigorously made to carefully store cultural heritages and replace them with accurate duplicated images for general exhibitions. For the purpose of enhancing people's recognition of cultural heritages, generated duplicated images are lent out to schools, cultural events, and the like to provide opportunities to make people feel familiar with cultural heritages.
Conventionally, craftsmen have generated duplicated images in handwriting. Handwriting duplication, however, requires many days to generate duplicated images. The quality of duplicated images depends on craftsmanship. In contrast, there is available a method using a digital camera and a printer as a method of generating a high-quality duplicated image in a small number of days. For example, Japanese Patent Laid-Open No. 5-103336 discloses a procedure for this method.
This procedure goes as follows: (1) capturing images of an original image and color chart with a digital camera under the same conditions; (2) generating a color conversion table for color matching between the color space of the camera and the color space of the printer from image signals of R (red), G (green), and B (blue) obtained from the image data of the color chart and input R, G, and B color signals from the color chart; (3) obtaining an image output with the same tone of color as that of the original image by performing color conversion for the image data of the original image using the color conversion table; and (4) outputting the color-converted original image captured image using the color printer.
To generate a very accurate duplicated image, it is necessary to capture an image by irradiating an original image with a sufficient amount of light for lighting without any lighting unevenness at the time of image capturing. This is because, the smaller the amount of light for lighting, the longer the exposure time for image capturing, resulting in electrical noise in the image data. As the exposure time prolongs, using a digital camera with a very large number of pixels makes even slight vibration appear as blur. To maintain the sharpness of a captured image, therefore, it is necessary to secure a sufficient amount of light for lighting.
When an operator captures an image of a work in the presence of lighting unevenness, the unevenness is reflected in the captured image and appears as brightness unevenness in the duplicated image. The operation of correcting this by using image editing software and the like takes much time and requires the operator to have specialized skill. When an image of a work is to be captured, therefore, it is preferable to capture an image of the work upon eliminating unevenness as much as possible by devising lighting. For example, there is available a method of securing the amount of light for lighting and its evenness by preparing many lightings such as artificial sunlight lamps and irradiating a work with light from a plurality of directions. It is often the case in which it is inhibited to irradiate cultural properties having high historical values and paintings with strong lighting in order to protect them or the degree of freedom in installing equipment because of the small depths of exhibition spaces is restricted. In practice, therefore, it is not realistic to capture images of such cultural properties by evenly irradiating them with light from strong lightings such as artificial sunlight lamps.
In most cases, therefore, image capturing is performed by irradiating works with light from many flashes for the following reasons. It is possible for flash light to obtain a sufficient amount of light within an irradiation time of several ten thousandth part of a second to several thousandth part of a second. This can prevent works from being damaged. In addition, this makes it possible to easily install equipment even in a place having a small depth, and allows even lighting. However, the color appearance of a duplicated image generated by using a captured image obtained by irradiation with flash light does not match that of the original image unless under a flash light source. It is practically impossible to view a work under flash light. When people view a duplicated image under an actual viewing light source, the color appearance of the original image does not match that of the duplicated image.
Assume that an operator has generated a duplicated image by capturing images of a color chart and original image under an actual viewing light source without irradiation of flash light. In this case, the color appearance of the original image matches that of the duplicated image under the viewing light source. However, the image data of the original image which is obtained by image capturing without using any flash contains much noise due to blur at the time of image capturing and lighting unevenness. As a consequence, the generated image is not a highly accurate duplicated image.
In order to solve the above problems, therefore, image capturing has been conventionally performed in the following manner.
FIG. 10 is a view schematically showing how image capturing is performed.
As shown in FIG. 10, the operator captures two images of the same original image, that is, “an image captured upon irradiation of flash light (flash captured image)” and “an image captured without flash light (viewing light source captured image)”. The operator then generates, from the two captured images, color conversion parameters for light source conversion which are used to convert the color appearance of the flash captured image into that under the viewing light source. The operator converts the color appearance of the flash captured image into that under the viewing light source by using the generated color conversion parameters.
Performing such light source conversion can solve the problems of noise and blur in viewing light source captured images. This light source conversion method, however, cannot still solve the problem of lighting unevenness in viewing light source captured images. If, therefore, light source conversion parameters are generated in the presence of lighting unevenness in a viewing light source captured image, it is impossible to perform accurate light source conversion due to the influence of lighting unevenness.
For this reason, as shown in FIG. 10, only part of the captured image is segmented to correct lighting unevenness in the viewing light source captured image. Although lighting unevenness occurs in the viewing light source captured image, segmenting only part of the image will reduce the influence of the lighting unevenness as compared with the lighting unevenness in the entire viewing light source captured image. Therefore, this technique segments only parts of the flash captured image and viewing light source captured image, and generates color conversion parameters for light source conversion from the segmented images. The technique then converts the colors of the flash captured image into colors optimized for the viewing light source. Generating a duplicated image by using a flash captured image optimized for a viewing light source in this manner will eliminate the problem of lighting unevenness.
As another method of correcting lighting unevenness, shading correction using a reference white board is known. For example, Japanese Patent Laid-Open No. 6-012204 discloses a method of correcting shading by generating illuminance correction data by capturing an image of white paper or the like before capturing an image of an object with a digital camera and applying the illuminance correction data when capturing an image of the object.
The above conventional method, however, has the following drawback.
In the method of segmenting only part of a captured image, the segmented image needs to include most of the colors existing in the original image. This method, therefore, does not perform light source conversion for, for example, the color which does not exist in the segmented image (encircled by the dotted line on the upper left side of the image), as shown in FIG. 10, and generates a duplicated image while maintaining the color appearance under the flash light sources. As described above, it is very difficult to find a region which is almost free from the influence of lighting unevenness and in which most of the colors of the entire original image exist.
On the other hand, shading correction using a reference white board can correct lighting unevenness in a viewing light source captured image by placing the reference white board at the same place as that of an original image and generating shading correction data from the captured image of the board. When handling an expensive work such as a work of art, the operator feels it difficult to move the work because of fear of damage. It is also difficult to place the reference white board at the same position as that of the work of art. That is, it is difficult to align a reference white board with a work of art or original image.